home *** CD-ROM | disk | FTP | other *** search
- Path: news.unicomp.net!usenet
- From: jgore@conline.com (Jerry_Gore)
- Newsgroups: comp.lang.c
- Subject: *Pointer to Functions(); /* HELP */
- Date: 22 Jan 1996 11:18:32 GMT
- Organization: Connect! On-Line
- Message-ID: <4dvrq8$c2c@news.unicomp.net>
- NNTP-Posting-Host: 204.96.7.103
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.99.2
-
- How do I pass a pointer to a funtion?
- The following is found in a program:
-
- #define WORD unsigned int
- void InstallTimer0(WORD period,void far (*func)(void));
-
- My function is thus:
-
- void far animate(void) /* I added 'far' for no good reason. */
- { /* It uses that name in InstallTimer0. */
- /* do what ever */
- return;
- }
-
- How do I send InstallTimer0 the pointer to my function animate ???
- I tried:
-
- InstallTimer0(120 , (*animate)());
-
- But of course, this does not work and neither did anything else!
- What do I do ???
-
-